package com.andaily.infrastructure.mybatis.data;

import com.andaily.domain.shared.DateUtils;
import com.andaily.domain.shared.MobileStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author Shengzhao Li
 */
public class AccountStatisticsData {

    private Date date;
    private BigDecimal amount;
    private String guid;
    private MobileStyle style;

    private String name;
    private int usedTime;
    private boolean daily;
    private boolean defaultType;

    public AccountStatisticsData() {
    }

    public String getDateAsText() {
        return DateUtils.toDateText(date);
    }

    public MobileStyle getStyle() {
        return style;
    }

    public void setStyle(MobileStyle style) {
        this.style = style;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getGuid() {
        return guid;
    }

    public void setGuid(String guid) {
        this.guid = guid;
    }

    public int getUsedTime() {
        return usedTime;
    }

    public void setUsedTime(int usedTime) {
        this.usedTime = usedTime;
    }

    public boolean isDaily() {
        return daily;
    }

    public void setDaily(boolean daily) {
        this.daily = daily;
    }

    public boolean isDefaultType() {
        return defaultType;
    }

    public void setDefaultType(boolean defaultType) {
        this.defaultType = defaultType;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public BigDecimal getAmount() {
        if (amount == null) {
            return BigDecimal.ZERO;
        }
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }
}
